package net.lab1024.sa.admin.module.system.type;

import cn.dev33.satoken.annotation.SaCheckPermission;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import net.lab1024.sa.admin.module.system.type.domain.TypeEntity;
import net.lab1024.sa.admin.module.system.type.service.TypeService;
import net.lab1024.sa.base.common.controller.SupportBaseController;
import net.lab1024.sa.base.common.domain.ResponseDTO;
import net.lab1024.sa.base.constant.SwaggerTagConst;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Tag(name = SwaggerTagConst.Support.CONFIG)
@RestController
public class TypeController extends SupportBaseController{

        @Resource
        private TypeService typeService;

        @Operation(summary = "分页商品信息")
        @GetMapping("/../queryType1")
        @SaCheckPermission("support:shop:query")
        public ResponseDTO<List<TypeEntity>> queryShopPage(@RequestParam(defaultValue = "") String key) {
            return typeService.getTypeList(key);
        }

}
